package ddd.ajava.chapter5.question2.udp;
import java.net.*;
import java.util.*;
import java.io.*;

public class UdpFileServerMore {
	public static void main(String[] args) throws Exception {  
		DatagramSocket getSocket;
		DatagramSocket getSocket1;		 
		InetAddress ip = InetAddress.getLocalHost();  
		int port = 8888;  
		int port2 =8889;
		
		getSocket = new DatagramSocket(port, ip); 	//得到发往这个端口的数据包  // 创建接收方的套接字,并制定端口号和IP地址  
		getSocket1 = new DatagramSocket(port2, ip);  //得到文件名数据
		UdpThread thread=new UdpThread(getSocket,getSocket1);
		Thread threadMore=new Thread(thread);//为一个会话单独开一个线程
		threadMore.start();//开始
    }
} 
